<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
if(session.getAttribute("account") == null){
	response.sendRedirect("index.jsp");
}
%>
<!DOCTYPE html> 
<html><!-- InstanceBegin template="/Templates/indexLogin.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>个人信息管理系统</title>

<link href="jquery-mobile/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css" />
<script src="jquery-mobile/jquery-1.6.min.js"></script>
<script src="jquery-mobile/jquery.mobile-1.0.min.js"></script>

<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript">

</script>
<!-- InstanceEndEditable -->
</head> 
<body> 

<div data-role="page" id="page">
	<div data-role="header">

	<!-- InstanceBeginEditable name="header" -->
		<h1>联系人列表</h1>
        <!-- InstanceEndEditable -->
        	<a href="logoff" data-role="button" class="ui-btn-right">
    注销
    </a>
           <div data-role="navbar">
        	<ul>
            <li><a href="dayAtAGlanceAction" id="main">一日行程</a></li>
            <li><a href="noteList" id="notes">便签</a></li>
            <li><a href="taskList" id="tasks">任务</a></li>
            <li><a href="contactList" id="contacts">联系</a></li>
            <li><a href="appointmentList" id="appointments">约会</a></li>
            </ul>
        </div>
	</div>
	<!-- InstanceBeginEditable name="content" -->
	<div data-role="content">	
	 <div id="contacts">
          <s:if test="%{!contacts.isEmpty()}">
                <ul data-inset="true" data-role="listview" data-split-theme="d" data-filter="true" dzhtata-filter-placeholder="搜索主题">
            <div data-role="collapsible-set">
          <s:iterator value="contacts">
          <li data-role="collapsible">
            <h1>姓名：<s:property value="name"/></h1>　
                <div class="ui-grid-a"  >
      <div class="ui-grid-c">
               <div class="ui-block-a">
               	<h1>住宅电话: <s:property value="homePhone"/></h1>
                <h1>工作电话: <s:property value="workPhone"/></h1>
               </div>
               <div class="ui-block-b"> 
               	<h1>住宅地址: <s:property value="address"/></h1>
                <h2>邮件: <s:property value="email"/></h2>
                 <h3>QQ: <s:property value="QQ"/></h3>
                 <h4>公司: <s:property value="company"/></h4>
               </div>
               <div class="ui-block-c">　　
              	<h1>备注:</h1>
                <span><s:property value="comments"/></span>
               </div>
               <div class="ui-block-d">　
               	 <a href="contactForware?operate=update&contact.con_id=<s:property value="con_id"/>" data-role="button">（修改）</a>
               <a href="contactForware?operate=delete&contact.con_id=<s:property value="con_id"/>" data-role="button">（删除）</a>
               </div>            
               </div>
               </div>
               </li>
          </s:iterator> 
        </div>
           </ul>   
          </s:if>
          <s:else>
          	<p>没有联系人</p>
          </s:else>
          </div>
        	
	</div>
    <!-- InstanceEndEditable -->
	<!-- InstanceBeginEditable name="footer" -->
	<div data-role="footer" align="center">
		<a href="m_contactCreate.jsp" data-icon="plus" data-iconpos="top">创建</a>
	</div>
    <!-- InstanceEndEditable -->
</div>
<!-- InstanceBeginEditable name="endLoad" -->
<script type="text/javascript">

</script>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
